<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
<link rel="stylesheet" href="../../static/assets/css/zpui.css"/>
<link rel="stylesheet" href="../../static/assets/css/all.css"/>
<link rel="stylesheet" href="../../static/mobile/default/css/layout.css?v=2"/>
<script src="../../static/assets/js/page.js"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>

    <title> 设置活动名额 </title>
</head>

<body>
<div class="page">
    <div class="page-hd">
        <div class="header bor-1px-b">
    <div class="header-left">
        <a href="javascript:history.go(-1)" class="left-arrow"></a>
    </div>
    <div class="header-title">设置活动名额</div>
    <div class="header-right">
        <a href="#"></a>
    </div>
</div>
    </div>

    <div class="page-bd" style="background-color: #ffffff;">
        <!-- 页面内容-->
        <div class="tx_input" style="margin: 0.3rem 0.4rem">
            <input id="levelID" class="weui-input" type="number"  placeholder="请输入ID">
        </div>
        <div id="role_user" style="margin: 0rem 0.4rem">
            
            
        </div>
<!--        <div class="tx_input select_arrow" style="margin: 0.3rem 0.4rem">-->
<!--            <input id='picker' class="weui-input"  placeholder="请选择代理等级">-->
<!--        </div>-->

        <div class="weui-btn-area" style="margin: 0.4rem">
            <a href="javascript:;" class="weui-btn weui-btn_primary">确定</a>
        </div>
    </div>
</div>
  <div class="alertBox">
      <div class="alertBG"></div>
      <div class="alert">
          <div class="text fs30 color_3 bor_b">

          </div>
          <!-- 单按钮 -->
          <div class="button fs32 fw_b color_r">
              知道了
          </div>
          <!-- 双按钮 -->
          <div class="buttonBox fs32 fw_b">
              <span class="color_9 bor_r cancel">取消</span>
              <span class="color_r confirm">确定</span>
          </div>
      </div>
  </div>
<script src="../../static/assets/js/lib/jquery-2.1.4.js"></script>
<script src="../../static/assets/js/jquery-weui.min.js"></script>
<script src="../../static/assets/js/lib/fastclick.js"></script>
   <script src="../../static/js/jquery/jquery.cookie.js"></script>
   <script src="../../static/mobile/default/js/page.js?v=1"></script>
<script>
    $(function() {
        FastClick.attach(document.body);
    });
</script>
<script>
    $('.weui-btn').on('click',function (res) {
        
     if(!$('#levelID').val()){
         _alert('请输入ID');
         return
     }
     _alert('确定设置ID号为'+$('#levelID').val()+'为活动名额吗？',function(){
         
         submit()
     });
        
     
    })
    function submit(){
        $.ajax({
            type:'get',
            url:'/api/mp/setActivitySign',
             headers:{ token: $.cookie('code')},
            data:{'id':$('#levelID').val()},
            success:function(res){
                if(res.errno != 0){
                    $.alert(res.errmsg)
                }else{
                     $.alert(res.errmsg,function () {
                       window.location.href = "/member/center/index.html";
                   });
                }
              
            }
        })
    }
</script>
</body>
</html>